package com.mall.coupon.server.controller;

import com.github.pagehelper.PageInfo;
import com.mall.common.core.domain.Result;
import com.mall.coupon.server.service.PmsSpuInfoService;
import com.mall.coupon.common.domain.PmsSpuInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/pmsSpuInfo")
@CrossOrigin
public class PmsSpuInfoController {
    @Autowired
    private PmsSpuInfoService pmsSpuInfoService;
    /**
     * spu商品搜索
     */
    @PostMapping("list")
    public Result<PageInfo<PmsSpuInfo>> list(PmsSpuInfo pmsSpuInfo){
        PageInfo<PmsSpuInfo> info = pmsSpuInfoService.selectPmsSpuInfoList(pmsSpuInfo);
        return Result.success(info);
    }

}
